#include <cstdio>


int main ()
{
	int test_cases, t, a, b, s;

	scanf("%d", &test_cases);
	for (t = 1; t <= test_cases; ++t)
	{
		scanf ("%d %d", &a, &b);
		a += (a + 1) % 2;
		b -= (b - 1) % 2;
		s = (a + b) * (b - a + 2) / 4;
		printf("Case %d: %d\n", t, s);
	}
}